﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing" xmlns:local="clr-namespace:Trackr.GUI.Views" x:Class="Trackr.GUI.Views.MainWindow"
        Title="Time Trackr" Icon="Images/time.ico" Width="460" MinHeight="250" SizeToContent="Height" AllowsTransparency="True" WindowStyle="None" Topmost="True" BorderThickness="6" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" Margin="0" Padding="0" Background="{x:Null}">
	<Window.DataContext>
		<local:MainWindowViewModel />
	</Window.DataContext>
	<Window.InputBindings>
		<KeyBinding Key="Left" Command="{Binding LeftKeyDownCommand}"/>
		<KeyBinding Key="Right" Command="{Binding RightKeyDownCommand}"/>
	</Window.InputBindings>
	<Window.Resources> 
  <Style x:Key="CustomStyle" TargetType="{x:Type TextBox}">
     <Setter Property="Background" Value="AliceBlue" />
	 <Setter Property="BorderThickness" Value="0"/>
  </Style>
 </Window.Resources>
	<Border Name="BorderMain"  BorderThickness="5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" UseLayoutRounding="True" CornerRadius="5" BorderBrush="#00C82020" Background="#FF4B95D8" >
		<!--<Border.Background>
			<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
				<GradientStop Color="#FF4B95D8" Offset="0"/>
				<GradientStop Color="#FF4B95D8" Offset="1"/>
			</LinearGradientBrush>
		</Border.Background>-->
		<Border.Effect>
			<DropShadowEffect Direction="305" BlurRadius="5" RenderingBias="Quality" ShadowDepth="1" Opacity="0.8"/>
		</Border.Effect>
		<Grid x:Name="gridMain" Margin="3">
			<Grid.RowDefinitions>
				<RowDefinition x:Name="rowHeader" Height="40" />
				<RowDefinition x:Name="rowInput" Height="50" />
				<RowDefinition x:Name="rowContentItems" Height="*" />
			</Grid.RowDefinitions>
			<Grid x:Name="gridHeader" Grid.Row="0">
				<Grid.ColumnDefinitions>
					<ColumnDefinition x:Name="colControls" Width="90" /> 		
					<ColumnDefinition x:Name="colInput" Width="*" />
					<ColumnDefinition x:Name="colClose" Width="90" />
				</Grid.ColumnDefinitions>
				<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,0,0,0">
					<Image Source="Images/back_white.png" Stretch="Fill" Height="20" Margin="5,0,10,0" Cursor="Hand" Name="imagePreviousWeek">
						<Image.InputBindings>
							<MouseBinding MouseAction="LeftClick" Command="{Binding ShowPreviousWeek}" />
						</Image.InputBindings>
					</Image>
					<Image Source="Images/next_white.png" Stretch="Fill" Height="20" Cursor="Hand" Name="imageNextWeek">
						<Image.InputBindings>
							<MouseBinding MouseAction="LeftClick" Command="{Binding ShowNextWeek}" />
						</Image.InputBindings>
					</Image>
				</StackPanel>
				<Label Content="{Binding CurrentWeekNrText}" Grid.Column="1" FontFamily="Segoe WP N Light" Margin="0"  VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20" Background="{x:Null}"  Foreground="White" />
				<Image Source="Images/cancel_white.png" Grid.Column="2" Stretch="Fill" HorizontalAlignment="Right" VerticalAlignment="Top"  Height="30" Width="30"  Name="imageClose" Cursor="Hand" />

			</Grid><!--/gridHeader-->
			<Grid x:Name="gridInput" Grid.Row="1" Margin="0,0,0,10">
				<Border Name="InputBorder" BorderThickness="1" Margin="5" Background="White" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" UseLayoutRounding="True" CornerRadius="3" BorderBrush="LightGray" >
					<TextBox Name="inputTask" Style="{StaticResource CustomStyle}" Text="{Binding Path=PlaceholderText}" Padding="4" FontFamily="Segoe WP Light" FontSize="16" VerticalAlignment="Center" Background="Transparent" BorderBrush="Transparent" VerticalContentAlignment="Stretch" HorizontalAlignment="Stretch" >
						<TextBox.InputBindings>
							<KeyBinding Key="Enter" CommandParameter="{Binding Text, ElementName=inputTask}" Command="{Binding SubmitTaskCommand}"/>
						</TextBox.InputBindings>
					</TextBox>
				
				</Border>
			</Grid>
			
			<ContentPresenter Grid.Row="2" Margin="-3,0,-3,0" HorizontalAlignment="Stretch" Name="stackPanelWeekViews" VerticalAlignment="Stretch" Content="{Binding CurrentWeekView}" />
		
		</Grid><!--/gridMain-->
	</Border>  
</Window>
